import './Mars3dSetUp.scss'
import { Button } from 'antd'
import PropTypes from 'prop-types'

import { optionsList } from '../../Assets/Params'
import { UseConfigSection } from '../../Template/FormTemplate'

const Mars3dFitA06 = ({ data, Off, ModalEvent }) => {
    Mars3dFitA06.propTypes = { data: PropTypes.object, Off: PropTypes.func, ModalEvent: PropTypes.object }

    const list = [
        { key: 101, uuid: 'FitA06', label: '夜视效果', type: 'EffectTemp', name: 'nightVisionEffect', options: optionsList.isEnable },
        { key: 102, uuid: 'FitA06', label: '打码效果', type: 'EffectTemp', name: 'mosaicEffect', options: optionsList.isEnable },
        { key: 103, uuid: 'FitA06', label: '黑白效果', type: 'EffectTemp', name: 'blackAndWhiteEffect', options: optionsList.isEnable },
        { key: 104, uuid: 'FitA06', label: '景深效果', type: 'EffectTemp', name: 'depthOfField', options: optionsList.isEnable },
        { key: 105, uuid: 'FitA06', label: '亮度效果', type: 'EffectTemp', name: 'brightnessEffect', options: optionsList.isEnable },
        { key: 106, uuid: 'FitA06', label: '泛光特效', type: 'EffectTemp', name: 'bloomEffect', options: optionsList.isEnable },
        { key: 107, uuid: 'FitA06', label: '雾天状态', type: 'EffectTemp', name: 'fogEffect', options: optionsList.isEnable },
        { key: 108, uuid: 'FitA06', label: '雨天状态', type: 'EffectTemp', name: 'rainEffect', options: optionsList.isEnable },
        { key: 109, uuid: 'FitA06', label: '下雪状态', type: 'EffectTemp', name: 'snowEffect', options: optionsList.isEnable },
        { key: 110, uuid: 'FitA06', label: '积雪状态', type: 'EffectTemp', name: 'snowCover', options: optionsList.isEnable },

        { key: 111, uuid: 'FitA06', label: '对象描边', type: 'EffectTemp', name: 'outlineEffect', options: optionsList.isEnable },
        { key: 112, uuid: 'FitA06', label: '对象泛光', type: 'EffectTemp', name: 'bloomTargetEffect', options: optionsList.isEnable },
    ]

    const onSubmit = () => {
        ModalEvent.emit({ type: 'scene', data })
        Off()
    }

    return (
        <div className='Mars3dSetUp Mars3dFitA06'>
            <div className='FormList'>
                {UseConfigSection(data, list)}
            </div>
            <div className='Button'>
                <Button type='primary' danger onClick={Off}>取消</Button>
                <Button type='primary' onClick={onSubmit}>保存</Button>
            </div>
        </div>
    );
};

export default Mars3dFitA06;